package com.dkha.server.services;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dkha.common.modules.vo.camera.CameraInfoVO;
import com.dkha.common.page.PageParam;
import com.dkha.server.modules.entities.FaceCameraEntity;
import com.dkha.server.modules.entities.faceCamera.FaceCameraExcel;
import com.dkha.server.modules.entities.faceCamera.FaceCameraInfo;
import com.dkha.server.modules.entities.faceCamera.FaceCameraList;
import com.dkha.server.modules.entities.faceCamera.InsertFaceCamera;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * 摄像头表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2019-12-08
 */
public interface FaceCameraService extends IService<FaceCameraEntity> {
    /**
     * 获取摄像头信息
     *
     * @param pageParam
     * @return
     */
    Page<FaceCameraList> getPage(PageParam pageParam);

    /**
     * 获取所有摄像头信息
     * @param cameraName
     * @return
     */
    List<FaceCameraEntity> getAll(String cameraName);

    /**
     * 新增摄像头
     * @param insertFaceCamera
     * @return 条数
     */
    Integer insertCamera(InsertFaceCamera insertFaceCamera);

    /**
     * /查看摄像头
     *
     * @param idCamera
     * @return
     */
    FaceCameraInfo findById(long idCamera);

    /**
     * 获取摄像头卡口树状图
     * 第一级传0
     * @param id
     * @return
     */
    List<Map<String, Object>> getBayonet(Long id);

    /**
     * 获取摄像头区域树状图
     *
     * @return
     */
    List<Map<String, Object>> getRegion(Long pid);

    /**
     * 获取当前区域下的摄像头
     * @param regionId
     * @return
     */
    List<Map<String, Object>> getCameraByRegionId(long regionId);

    /**
     * 获取当前区域下尚未布控的摄像头
     * @param regionId
     * @return
     */
    List<Map<String, Object>> getRegionUnControlCamera(long regionId);

    /**
     * 获取当前区域下的所有摄像头
     * @param regionId
     * @return
     */
    List<Map<String, Object>> getAllCameraByRegionId(long regionId);
    Integer delete(long camera);

    /**
     * 修改摄像头状态
     * @param camera
     * @param status
     * @return
     */
    Integer status(long camera, boolean status);

    /**
     * Excel导入
     * @param multipartFile
     * @return
     * @throws Exception
     */
    List<FaceCameraExcel> importExcel(MultipartFile multipartFile) ;

    /**
     * 修改摄像头信息
     * @param faceCameraInfo
     * @return
     */
    Integer update(FaceCameraInfo faceCameraInfo);

    /**
     * 根据任务获取所有布控摄像头信息
     * @return
     */
    List<FaceCameraEntity> findCameraByTask();

    /**
     * 经纬度查询摄像头信息
     * @param cameraLongitude
     * @param cameraLatitude
     * @return
     */
    FaceCameraEntity findByCoordinate(String cameraLongitude,String cameraLatitude);
    CameraInfoVO selectFaceCameraID(String idFaceCamera);
}